proc confirm(message:string): bool =
  echo message
  var answer = readLine(stdin)

  case answer
  of "y", "Y", "yes", "Yes", "true", "True", "1":
    return true
  of "n", "N", "no", "No", "false", "False", "0":
    return false
  else:
    echo "ignore..."
    return false

var confirmed = confirm("Are you sure?")
if confirmed:
  echo "OK"
else:
  echo "Canceled"


